const Sequelize = require('sequelize')
const { database, user, password, host, port } = require('../config/config').MYSQL_CONF

const sequelize = new Sequelize(database, user, password, {
  dialect: 'mysql',
  host,
  port,
  timezone: '+08:00',
  define: {
    paranoid: true
  }
})

sequelize.sync()

module.exports = sequelize